<?php

namespace app\middleware;

use Webman\MiddlewareInterface;
use Webman\Http\Response;
use Webman\Http\Request;

class Poweredby implements MiddlewareInterface
{
    public function process(Request $request, callable $next): Response
    {
        $response = $request->method() == 'OPTIONS' ? response('') : $next($request);
//        $response->withHeaders(['X-Powered-By' => 'wolfcode']);
        $response->withoutHeader('Set-Cookie');
        return $response;
    }
}